import request from '@/utils/request'

// 查询项目附件列表
export function listProjectAttachment(productId,query) {
  return request({
    url: '/user/project/projectAttachment/list/' + productId,
    method: 'get',
    params: query
  })
}

// 查询项目附件详细
export function getProjectAttachment(attachmentId) {
  return request({
    url: '/user/project/projectAttachment/' + attachmentId,
    method: 'get'
  })
}

// 新增项目附件
export function addProjectAttachment(productId,data) {
  return request({
    url: '/user/project/projectAttachment/'+productId,
    method: 'post',
    data: data
  })
}

// 修改项目附件
export function updateProjectAttachment(data) {
  return request({
    url: '/user/project/projectAttachment',
    method: 'put',
    data: data
  })
}

// 删除项目附件
export function delProjectAttachment(attachmentId) {
  return request({
    url: '/user/project/projectAttachment/' + attachmentId,
    method: 'delete'
  })
}

// 删除项目附件
export function listMyProjectAttachment(productId,query) {
  return request({
    url: '/user/project/projectAttachment/myList/' + productId,
    method: 'get',
    params: query
  })
}
